package com.coolingme.springboot.dubbo.springbootdubbosampleprovider.service;

import com.coolingme.springboot.dubbo.ILoginService;
import org.apache.dubbo.config.annotation.DubboService;

/**
 * @author wangyue
 * @date 2024/03/04 20:21
 */
//@DubboService
@DubboService(registry = {"nanjing"})
public class LoginServiceImpl implements ILoginService {
    @Override
    public String login(String userName, String password) {
        System.out.println(Thread.currentThread().getName() + " login");
        if ("admin".equals(userName) && "admin".equals(password)) {
            return "success";
        }
        return "fail";
    }
}
